process.on('unhandledRejection', (reason) => {
    console.log('Reason: ' + reason);
});

function foo() {
    Promise.reject('abc');
}

foo();
